﻿using BCCommon;
using BCCommon.OAEnums;
using BCDto.MySql.Admin;
using BCDto.OA.Attendance.AttendanceGroup;

namespace BCService.OA.Attendance.AttendanceGroup
{
    /// <summary>
    /// 考勤组信息
    /// </summary>
    public interface IAttendanceGroupService
    {
        /// <summary>
        /// 获取指定的考勤组信息
        /// </summary>
        /// <param name="groupId"></param>
        /// <returns></returns>
        AttendanceGroupViewDto GetByGroupId(long groupId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="groupId"></param>
        /// <returns></returns>
        AttendanceGroupViewForStaffAppDto GetByGroupIdForStaffApp(long groupId);

        /// <summary>
        /// 分页查询考勤组信息
        /// </summary>
        /// <param name="admin">当前登录管理员</param>
        /// <param name="ascending"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="groupName">考勤组名称</param>
        /// <param name="type">考勤类型</param>
        /// <param name="checkInMode">打卡方式</param>
        PageableList<AttendanceGroupViewDto> GetList(AdminDto admin, bool? ascending, int pageIndex, int pageSize, string groupName, AttendanceType? type, CheckInMode? checkInMode);

        /// <summary>
        /// 新创建固定考勤组
        /// </summary>
        /// <param name="admin">当前管理员</param>
        /// <param name="dto">考勤信息</param>
        /// <returns></returns>
        AttendanceGroupDto CreateFixedGroup(AdminDto admin, AttendanceFixedGroupRequestDto dto);

        /// <summary>
        /// 新创建排班制考勤组
        /// </summary>
        /// <param name="admin">当前管理员</param>
        /// <param name="dto">考勤信息</param>
        /// <returns></returns>
        AttendanceGroupDto CreateTurnGroup(AdminDto admin, AttendanceTurnGroupRequestDto dto);

        /// <summary>
        /// 新创建自由时间考勤组
        /// </summary>
        /// <param name="admin">当前管理员</param>
        /// <param name="dto">考勤信息</param>
        /// <returns></returns>
        AttendanceGroupDto CreateNoneGroup(AdminDto admin, AttendanceNoneGroupRequestDto dto);


        /// <summary>
        /// 删除指定的考勤组信息
        /// </summary>
        /// <param name="admin">当前管理员</param>
        /// <param name="groupId"></param>
        /// <returns></returns>
        int Delete(AdminDto admin, long groupId);

        /// <summary>
        /// 获取当前员工所在的考勤组信息
        /// </summary>
        /// <param name="admin"></param>
        /// <returns></returns>
        AttendanceGroupViewForStaffAppDto GetCurrentAttendanceGroup(AdminDto admin);

        #region 修改操作

        /// <summary>
        /// 修改固定考勤组信息
        /// </summary>
        /// <param name="admin"></param>
        /// <param name="groupId"></param>
        /// <param name="attendanceFixed"></param>
        /// <returns></returns>
        AttendanceGroupDto UpdateFixedGroup(AdminDto admin, long groupId, AttendanceFixedGroupRequestDto attendanceFixed);
        /// <summary>
        /// 修改排班考勤组信息
        /// </summary>
        /// <param name="admin"></param>
        /// <param name="groupId"></param>
        /// <param name="turnGroupRequestDto"></param>
        /// <returns></returns>
        AttendanceGroupDto UpdateTurnGroup(AdminDto admin, long groupId, AttendanceTurnGroupRequestDto turnGroupRequestDto);
        /// <summary>
        /// 修改自由时间考勤组信息
        /// </summary>
        /// <param name="admin"></param>
        /// <param name="groupId"></param>
        /// <param name="noneGroupRequestDto"></param>
        /// <returns></returns>
        AttendanceGroupDto UpdateNoneGroup(AdminDto admin, long groupId, AttendanceNoneGroupRequestDto noneGroupRequestDto);


        #endregion

    }
}
